package com.imooc.repository;

import com.imooc.doman.Girl;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface GirlRepository extends JpaRepository<Girl,Integer> {
    //通过年龄来查询
    public List<Girl> findByAge(Integer age);//jpa会根据方法名自动创建sql语句
    //根据id返回对象
    public Girl findGirlById(Integer id);

}
